<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@page import="java.util.Calendar" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%--<link href="images/skin.css" rel="stylesheet" type="text/css"/>--%>
    <link href="css/uploadify.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="script/jquery/jquery-1.4.2.js"></script>
    <script type="text/javascript">
        function checkFile(objForm) {

            var form = objForm;
            var uploadFile = form.upload.value;
            if (uploadFile != "" && uploadFile != null) {
                var ext = uploadFile.substring(uploadFile.length - 3).toLowerCase();//jpg/gif/bmg/png
                if (ext != "mp3" && ext != "wma" && ext != "wav" &&
                        ext != "ogg" && ext != "ape" && ext != "acc") {
                    alert("只允许上传mp3,wma,wav,ogg,ape,acc类型的文件!");
                    return false;
                }
                form.uploadFileName.value = uploadFile.substring(uploadFile.lastIndexOf("\\") + 1).toLowerCase();
            } else {
                alert("没有上传文件");
                return false;
            }
            return true;
        }
    </script>
    <link type="text/css" rel="stylesheet" href="css/smartmenu.css">
    <script type="text/javascript" src="<%=basePath%>/jslib/jquery.js"></script>
    <script type="text/javascript" src="jslib/index/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="jslib/index/smartmenu-min.js"></script>
    <script type="text/javascript">
        jQuery(window).ready(function () {
            jQuery("#navigation").Smartmenu({animationDuration:350});
        });
        SyntaxHighlighter.all();
    </script>

    <script language="JavaScript" type="text/javascript">
        function topage(page) {
            var form = document.getElementById("myform");
            document.getElementById("page")
                    .setAttribute("value",page);
            form.submit();
        }
    </script>
</head>
<body>
<%@ include file="/page/share/menu.jsp" %>
<div id="content">
<form action="File!uploadFile.action" method="post" enctype="multipart/form-data"
      onsubmit="return checkFile(this)">
    <input type="hidden" name="uploadFileName"/>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <input type="file" name="upload">
            </td>
        </tr>

        <tr>
            <td>
                <%-- 歌曲名字：<input type="text" name="uploadFileName"/>--%>
                描述：<input type="text" name="description" id="des" style="width: 400px;height: 25px;">
            </td>

        </tr>
        <tr>
            <td>
                <input type="submit" value="提交" id="stb" class="btn">

            </td>
        </tr>
    </table>
</form>
<%--<s:form action="uploadFile.action" method="post" enctype="multipart/form-data">
    <s:file name="upload" label="文件名" />
    <s:textfield name="author" label="上传者" />
    <s:textfield name="description" label="文件描述" />
    <s:submit value="上传" />
</s:form>--%>
</div>
<div id="bottom">
    <ul>
        <li>
            联系我们：
            <a href="mailto:willsonz@qq.com?subject=KTV综合管理系统">willsonz@qq.com</a>
        </li>
    </ul>
    <ul>
        <li>
            ©&nbsp;Made By Cloud Team.
        </li>
    </ul>
</div>
</body>
</html>